package com.inspur.dgov.bsp.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.inspur.dgov.bsp.user.entity.PubOrgan;
import com.inspur.dgov.bsp.user.entity.PubRegion;
import com.inspur.dgov.bsp.user.entity.PubUser;
import com.inspur.dgov.bsp.user.vo.OrganNode;
import com.inspur.dgov.common.tool.node.TreeNode;

import java.util.List;

/**
 * 树结构Mapper接口
 *
 * @Author chiyupei
 * @Date 19 下午8:15
 * @Version 1.0
 * @Description 树结构Mapper接口
 */
public interface TreeMapper extends BaseMapper<TreeNode> {

    /**
     * 子级区划树
     * @param root
     * @return
     */
    List<OrganNode> regionTree(PubRegion root);

    /**
     * 组织机构树
     * @param organ
     * @return
     */
    List<OrganNode> organTree(PubOrgan organ);

    /**
     * 用户树
     * @param user
     * @return
     */
    List<TreeNode> userTree(PubUser user);
}
